| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Compiler Options</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="bm_id681592403821304"></a>
<meta itemprop="keywords" content="Compiler Options">
<meta itemprop="keywords" content="Runtime conditions">
<a name="classmodulefunction"></a>
<h1 id="hd_id951592401835244" dir="auto">
<a name="compileroptions"></a>Compiler Options, Runtime Conditions</h1>
<p id="N0084" class="paragraph" dir="auto">Compiler options specified at the module level affect LibreOffice <span class="emph">Basic compiler checks</span> and error messages. Basic syntax as well as Basic set of instructions can be different according to the options that are in use. The less <span class="literal">Option</span>, the easiest and tolerant LibreOffice Basic language is. The more <span class="literal">Option</span>, the richer and controlled Basic language gets.</p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id141592406254504" dir="auto">Compiler options must be specified before the executable program code in a module.</p></div>
</div>
<br>
<div class="embedded">
<a name="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Syntax:</h3>
</div>
<p id="par_id491585753339474" class="paragraph" dir="auto"><img src="media/helpimg/sbasic/Option_statement.svg" class="genericimage" alt="Option Statement diagram" style="width:;height:" itemprop="image" itemscope="true" itemtype="http://schema.org/ImageObject"></p>
<div class="embedded">
<a name="optionbase"></a>
<h2 id="hd_id3155805" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03103200.html">Option Base Statement</a></h2>
<p id="par_id3147242" class="paragraph" dir="auto">Defines the default lower boundary for arrays as 0 or 1.</p>
</div>
<div class="embedded">
<a name="classmodulefunction"></a>
<h2 id="N0083" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/classmodule.html">Option ClassModule Statement</a></h2>
<p id="N0084" class="paragraph" dir="auto">Specifies that the module is a class module that contains members, properties, procedures and functions.</p>
</div>
<div class="embedded">
<a name="optioncompatiblestatement"></a>
<h2 id="N0104" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/compatible.html">Option Compatible Statement</a></h2>
<p id="N0106" class="paragraph" dir="auto"><span class="literal">Option Compatible</span> extends LibreOffice Basic compiler and runtime, allowing supplemental language constructs to Basic.</p>
</div>
<div class="embedded">
<a name="compatibilitymodefunction"></a>
<h2 id="N0118" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/compatibilitymode.html">CompatibilityMode() Function</a></h2>
<p id="N0120" class="paragraph" dir="auto"><span class="literal">CompatibilityMode()</span> function controls or queries runtime mode. It affects all code executed after setting or resetting the runtime mode. </p>
</div>
<div class="embedded">
<a name="optionexplicit"></a>
<h2 id="hd_id3145090" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03103300.html">Option Explicit Statement</a></h2>
<p id="par_id3148538" class="paragraph" dir="auto">Specifies that every variable in the program code must be explicitly declared with the Dim statement.</p>
</div>
<h2 id="hd_id331592403410631" dir="auto">Option Private Module</h2>
<p id="par_id161592405163812" class="paragraph" dir="auto">Specifies that the scope of the module is that of the Basic library it belongs to.</p>
<div class="embedded">
<a name="optionVBASupport"></a>
<h2 id="hd_id3145090" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03103350.html">Option VBASupport Statement</a></h2>
<p id="par_id3148538" class="paragraph" dir="auto">Specifies that LibreOffice Basic will support some VBA statements, functions and objects.</p>
</div>
<div class="warning">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id141592408035462" dir="auto">Options specified at the module level also affect LibreOffice <span class="emph">Basic runtime conditions</span>. The behaviour of LibreOffice Basic instructions can differ.</p></div>
</div>
<br>
<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
<p id="par_id291592407073335" class="paragraph" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/property.html">Property statement</a></p>
<div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/special_vba_func.html">Exclusive VBA Functions and Statements</a></p></div>
<div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/ErrVBA.html">Err Object [VBA]</a></p></div>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/Compiler_options.xhp" target="_blank">/text/sbasic/shared/Compiler_options.xhp</a></p>
<p dir="auto">Title is: Compiler Options</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>